<%--<%@ page import="java.util.Date" %>--%>
<%--<%@ page import="java.util.Calendar" %>--%>
<%--<%@ page import="java.text.SimpleDateFormat" %>--%>
<%--
  Created by IntelliJ IDEA.
  User: 14365
  Date: 2021/9/30
  Time: 11:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script src="${pageContext.request.contextPath}/js/jquery-3.4.1.js"></script>
<script src="${pageContext.request.contextPath}/layui/layui.js" charset="utf-8"></script>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自驾租车</title>
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/image/title-img1.png">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css"  media="all">
    <link href="${pageContext.request.contextPath}/css/footer.css" rel="stylesheet">
    <style>

        /* 头部导航的 */
        .global-header .login-page-header-nav li {
            float: left;
            margin-left: 30px;
        }

        .global-header .login-page-header-nav li i {
            margin-right: 10px;
            font-size: 28px;
            line-height: 1;
            color: #f6a206;
            vertical-align: middle;
        }

        .global-login-iconfont {
            font-family: "login-iconfont", serif;
            font-style: normal;
            font-weight: normal;
            cursor: default;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;

        }

        .global-header .login-page-header-nav li span {
            font-size: 14px;
            line-height: 28px;
            color: #666;
            vertical-align: middle;
        }

        #container {
            overflow: hidden;
            width: 270px;
            height: 270px;
            margin: 0;
            font-family: "微软雅黑";
        }

        /*取还车门店1*/
        .citystore .citysel {
            display: inline-block;
            float: left;
            width: 120px;
            margin-right: 4px;

        }

        .citystore .input-txt {
            float: left;
            height: 24px;
            padding: 0 6px;
            line-height: 24px;
            border: solid 1px #cdcdcd;
            cursor: pointer;
        }

    </style>

    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=549rp32hlKNSQOYqZCP80gA8u9pG7LDq"></script>
</head>

<link rel="stylesheet" href="${pageContext.request.contextPath}/css/index-1.css">
<link href="${pageContext.request.contextPath}/css/headermenu.css" rel="stylesheet">


<body>
<header id="J-global-header" class="global-header">
    <div class="top-inner">
        <div id="sitenav" class="global-header-top-nav fn-clear">
            <div class="global-header-top-nav-right">
                <li class="top-nav-menu top-nav-menu-user-info" data-role="user-info" data-test="test">
                    <div class="top-nav-menu-handle">
                        <div class="login">
                            <%--                            <a href="${pageContext.request.contextPath}/login.jsp" class="J-login-btn" rel="nofollow" target="_self">登录/注册</a></div>--%>
                            <c:if test="${empty ServiceResponse}">
                                <a href="${pageContext.request.contextPath}/customer/login.jsp">登录/注册</a>
                            </c:if>

                            <c:if test="${!empty ServiceResponse}">
                                欢迎${ServiceResponse.data.custTelno}
                                <a href="${pageContext.request.contextPath}/logout">退出</a>
                            </c:if>
                        </div>
                    </div>
                </li>

                <li class="top-nav-menu top-nav-multi-menu top-nav-dl-app">
                    <div class="top-nav-menu-handle">
                        <i class="global-header-icon top-nav-dl-app-icon"></i>手机版
                    </div>
                    <div class="top-nav-menu-body top-nav-menu-qrcode">
                        <div class="top-nav-menu-bd-panel">
                            <div class="qrcode-img"></div>
                            <p>下载APP 领99元租车红包

                            </p>
                        </div>
                    </div>
                </li>

                <li class="top-nav-pipe">|</li>

                <li class="top-nav-menu top-nav-multi-menu top-nav-wx-guide">
                    <div class="top-nav-menu-handle"><i class="global-header-icon top-nav-wx-guide-icon"></i>微信</div>
                    <div class="top-nav-menu-body top-nav-menu-qrcode">
                        <div class="top-nav-menu-bd-panel">
                            <div class="qrcode-img"></div>
                            <p>扫一扫，关注微信</p>
                        </div>
                    </div>
                </li>
                <li class="top-nav-menu top-nav-multi-menu top-nav-order-lookup">
                    <div class="top-nav-menu-handle">订单查询<i class="top-nav-arrow"><em></em><span></span></i></div>
                    <div class="top-nav-menu-body top-nav-menu-list">
                        <div class="top-nav-menu-bd-panel">
                            <a href="${pageContext.request.contextPath}/center/myorder.jsp">订单查询</a>
                        </div>
                    </div>
                </li>
                <li class="top-nav-menu top-nav-multi-menu top-nav-order-lookup">
                    <div class="top-nav-menu-handle">个人中心<i class="top-nav-arrow"><em></em><span></span></i></div>
                    <div class="top-nav-menu-body top-nav-menu-list">
                        <div class="top-nav-menu-bd-panel">
                            <a href="${pageContext.request.contextPath}/center/user.jsp">进入个人中心</a>
                        </div>
                    </div>
                </li>
                <li class="top-nav-pipe">|</li>

            </div>

            <div class="global-header-top-nav-left">
                <div class="top-nav-menu top-nav-multi-menu top-nav-contact">
                    <div class="top-nav-menu-handle">
                        24小时客服！内地热线：110-120
                        <i class="top-nav-arrow"><em></em><span></span></i>
                    </div>
                    <div class="top-nav-menu-body top-nav-menu-list">
                        <div class="top-nav-menu-bd-panel">
                            <ul>
                                <li>
                                    <span class="title">中国内地热线</span>
                                    <a href="tel:10101020" target="_self" class="tel-number">110-120</a>
                                </li>
                            </ul>
                            <div class="top-nav-menu-bd-code">
                                <div class="qrcode-img"></div>
                                <p class="title">关注微信公众号</p>
                                <p class="text">可查询/修改/取消订单</p>
                                <a class="J-show-robot" href="javascript:" target="_self"
                                   data-tj="/公用头部/在线客服">24小时在线客服</a>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="toolbar fn-clear">
        <div id="slog" class="logo fn-left">
            <a class="sbx-logo" title="思必行-租车" target="_self" href="">

            </a>
        </div>
        <div class="toolbar-site-header-nav">
            <ul class="login-page-header-nav fn-clear">
                <li><i class="global-login-iconfont">&#xe909;</i><span>有驾照就能租</span></li>
                <li><i class="global-login-iconfont">&#xe906;</i><span>地图导航</span></li>
                <li><i class="global-login-iconfont">&#xe908;</i><span>24小时服务在线</span></li>
            </ul>
        </div>

    </div>
</header>

<!--导航-->
<div class="nav">
    <ul class="nav-wrap clear_float" id="J_NavBox">
        <li>
            <a href="../index.jsp" target="_blank">首页</a>
            <span></span>
        </li>
        <li class="menu-index menu-index-on">
            <a href="../selfrental/person_rentalcar.jsp" target="_blank">自驾租车</a>
            <span></span>
        </li>
        <li class>
            <a href="../car/car.jsp" target="_blank">车型查询</a>
            <span></span>
        </li>
        <li>
            <a href="../memberrent/members.jsp" target="_blank">会员租车</a>
            <span></span>
        </li>
        <li>
            <a href="../store/store.jsp" target="_blank">营业网点</a>
            <span></span>
        </li>
        <li>
            <a href="../memberrent/wonderful_activity.jsp" target="_blank">精彩活动</a>
            <span></span>
        </li>

    </ul>
</div>

<link href="${pageContext.request.contextPath}/css/person_rentalcar.css" rel="stylesheet">

<!--选择类型，时间，门店-->
<div id="content" class="clear_float">
    <!--导航和下面的框-->
    <div class="nav-city-box">
        <p></p>
    </div>
    <!--取车还车时间-->
    <div class="choosecartype">
        <form id="form0" method="post">
            <div class="term clearfix">
                <ul class="first">
                    <li>
                        <label class="key"> 取车门店: </label>
                        <div class="citystore">

                            <input class="citysel input-txt" id="citySel1" name="PickUpCity" type="text" value="苏州">
                            <input class="mendian input-txt fl" id="storeSel1" name="storeBorrow" type="text"
                                   value="请选择取车门店" list="borrow-store-list">
                            <datalist id="borrow-store-list"></datalist>
                            <span id="borrow-store-id" style="display: none;"></span>
                        </div>
                        <label class="ckb-scsm ">
                            <input class="checkboxin" name="IsSendService" type="checkbox">
                            <span>送车上门</span>
                        </label>
                    </li>
                    <li>
                        <label class="key"> 还车门店:</label>
                        <div class="citystore">

                            <input class="citysel input-txt" id="citySel2" name="PickUpCity" type="text" value="苏州">
                            <input class="mendian input-txt" id="storeSel2" name="storeReturn" type="text"
                                   value="请选择取车门店"
                                   list="return-store-list">
                            <datalist id="return-store-list"></datalist>
                            <span id="return-store-id" style="display: none;"></span>
                        </div>
                        <label class="ckb-scsm ">
                            <input class="checkboxin" name="IsSendService" type="checkbox">
                            <span>上门取车</span>
                        </label>
                    </li>

                </ul>
                <ul class="second">
                    <li>
                        <label class="key tit"> 取车时间:</label>
                        <div class="f1" style="display: inline; margin-right: 4px;">
                            <div style="position: relative; display: inline-block;width: 125px;height: 26px;">

                                <input class="timedetail input-txt booking-box" id="time1" name="getCarDate"
                                       type="date">

                                <%--                                <input class="timedetail input-txt booking-box" id="time1" type="date">--%>

                                <%--<input type="text" class="layui-input" id="time1">--%>
                            </div>
                        </div>

                        <%--<div class="f1" style="display: inline; margin-right: 4px;">
                            <input class="f-text input-txt"  name="PickUpDate"  type="time"  style="position: absolute;">
                        </div>--%>
                    </li>
                    <li>
                        <label class="key tit">还车时间:</label>
                        <div class="f1" style="display: inline; margin-right: 4px;">
                            <div style="position: relative; display: inline-block;width: 125px;height: 26px;">

                                <input class="timedetail input-txt booking-box" name="getCarDate" type="date"
                                       id="time2">

                                <%--                                <input class="timedetail input-txt booking-box" type="date" id="time2">--%>

                                <%--<input type="text" class="layui-input" id="time1">--%>
                            </div>
                        </div>
                        <%--<script>
                            window.onload = function (){
                                var timestamp1 = Date.parse(new Date());

                                alert(new Date().toLocaleDateString());
                                // alert();toLocaleDateString
                            }
                        </script>--%>

                        <%--<div class="f1" style="display: inline; margin-right: 4px;">
                            <input class="f-text input-txt" id="J_date_1" name="PickUpDate"  type="time"  style="position: absolute;">
                        </div>--%>
                    </li>

                </ul>
                <input class="reviseBtn" type="button" value id="btnSubmit" href="javascript:void(0)">
            </div>
        </form>
        <!--中间白框-->
        <div class="prompt-box clearfix">
            <div class="company-prompt" id="companyPrompt"></div>
            <div class="lease-prompt" id="days">
                <%--                * 当前选定租期:--%>
                <%--                <span>2</span>--%>
                <%--                天--%>
            </div>
        </div>

        <!--筛选车型-->
        <div class="car-box-body">
            <div class="choose-typebox">
                <div class="choose-model cartypelist">
                    <a class="classify-all on">
                        <div class="modelall">
                            <span></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>经济型</p>
                            <span class="model-pic2"></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>舒适型</p>
                            <span class="model-pic3"></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>精英型</p>
                            <span class="model-pic4"></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>SUV</p>
                            <span class="model-pic5"></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>5-15座商务</p>
                            <span class="model-pic6"></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>电动型</p>
                            <span class="model-pic7"></span>
                        </div>
                    </a>
                    <a>
                        <div class="model-classify">
                            <p>高端车</p>
                            <span class="model-pic8"></span>
                        </div>
                    </a>
                </div>
                <!--品牌-->
                <div class="choose-branch">
                    <div class="choose-brand choose-ck">
                        <span class="span-pp">品牌: </span>
                        <div class="brandlist" style=" height:90px;">
                            <dd class="on"><a href="javascript:void(0)">全部</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">宝马</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">大众</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">福特</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">本田</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">丰田</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">马自达</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">吉利</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">标致</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">别克</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">铃木</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">华晨华颂</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">现代</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">保时捷</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">奇瑞</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">比亚迪</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">奥迪</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">奔驰</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">长安</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">东南</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">福特</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">汇众</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">江淮</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">江铃</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">金杯</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">金龙</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">别克</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">中华</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">日产</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">长城</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">东风</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">MINI</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">东风小康</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">雷克萨斯</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">林肯</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">雷诺</a></dd>
                        </div>
                    </div>
                    <!--价格-->
                    <div class="choose-price choose-ck">
                        <span class="span-pp1">价格: </span>
                        <div class="pricelist">
                            <dd class="on"><a href="javascript:void(0)">全部</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">100元以下</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">100-200元</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">200-300元</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">300元以上</a></dd>

                        </div>

                    </div>
                    <!--排挡-->
                    <div class="choose-gear choose-ck">
                        <span class="span-pp2">排挡: </span>
                        <div class="gearlist">
                            <dd class="on"><a href="javascript:void(0)">全部</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">手动</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">自动</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">无级变速</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">手自一体</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">双离合</a></dd>
                        </div>
                    </div>
                    <!--座位-->
                    <div class="choose-ck choose-seat">
                        <span class="span-pp3">座位: </span>
                        <div class="seatlist">
                            <dd class="on"><a href="javascript:void(0)">全部</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">2座</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">4座</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">5座</a></dd>
                            <dd><a href="javascript:void(0)" class="clickBtn">7座</a></dd>

                        </div>

                    </div>


                    <!--筛选排序-->
                    <div class="sort clearfix">
                        <ul class="field-orderby">
                            <li class="sort-default">
                                <a href="" class="order-def">默认排序</a>
                            </li>
                            <%--   <li class="sort-price">
                                   <a href="" class="order-def">按租金</a>

                               </li>
                               <li class="sort-emission">
                                   <a href="" class="order-def">按座位</a>

                               </li>--%>
                        </ul>
                        <%--<div class="field-tip">
                            共有<span id="carTypeCount">5</span>种车型可以租用
                        </div>--%>

                    </div>
                    <!--车辆详情列表-->
                    <div class="carwrap clearfix">
                        <div>
                            <div class="det-carlist">
                                <ul>
                                    <%-- <!--车图片-->
                                     <li class="licar-picbox">
                                         <div class="licar-picinfo">
                                             <img src="${pageContext.request.contextPath}/image/list-car1.png" class="lazy" style="display: inline;">
                                         </div>
                                     </li>
                                     <!--车介绍-->
                                     <li class="licar-namebox">
                                         <div class="licar-nameinfo">
                                             <p class="car-nameinfo">
                                                 <span>荣威ERX5（混动）沪牌</span>
                                                 <a href="" class="sp-aczs sp-box">
                                                     <i class="lv5"></i>
                                                 </a>
                                             </p>
                                             <p class="car-introinfo">
                                                             <span>
                                                                 自动 1.5
                                                                 <text>T</text>
                                                             </span>
                                                 <text>|</text>
                                                 <span>SUV</span>
                                                 <text>|</text>
                                                 <span>5座</span>
                                                 <text>|</text>
                                                 <a href="" id="carDetail1">车辆详情></a>
                                             </p>
                                             <p class="car-introinfo">
                                                 <span></span>
                                             </p>
                                             <p class="car-activeinfo">
                                                 <span class="shalloworg">省油</span>
                                                 <span class="shalloworg">空间</span>
                                                 <span class="shalloworg">新能源</span>
                                             </p>

                                         </div>
                                     </li>
                                     <!--车价格-->
                                     <li class="licar-info">
                                         <p class="condition1">
                                             <span class="cartitle"></span>
                                             <span class="carprice">
                                                             <i class="symbol">￥</i>
                                                             <em class="total-price">150</em>
                                                             /日均
                                                         </span>
                                             <a href="../myorder/save.jsp"><span class="licar-btn btnopen1 " >预定</span></a>
                                         </p>
                                     </li>
                                 </ul>
                             </div>
                         </div>
                         <div>
                             <div class="det-carlist" style="z-index: 299;">
                                 <ul>
                                     <!--车图片-->
                                     <li class="licar-picbox">
                                         <div class="licar-picinfo">
                                             <img src="${pageContext.request.contextPath}/image/list-car2.png" class="lazy" style="display: inline;">
                                         </div>
                                     </li>
                                     <!--车介绍-->
                                     <li class="licar-namebox">
                                         <div class="licar-nameinfo">
                                             <p class="car-nameinfo">
                                                 <span>丰田亚洲狮</span>
                                                 <a href="" class="sp-aczs sp-box">
                                                     <i class="lv5"></i>
                                                 </a>
                                             </p>
                                             <p class="car-introinfo">
                                                             <span>
                                                                 无级变速
                                                                 <text></text>
                                                             </span>
                                                 <text>|</text>
                                                 <span>三厢</span>
                                                 <text>|</text>
                                                 <span>5座</span>
                                                 <text>|</text>
                                                 <a href="" id="carDetail2">车辆详情></a>
                                             </p>
                                             <p class="car-introinfo">
                                                 <span></span>
                                             </p>
                                             <p class="car-activeinfo">
                                                 <span class="shalloworg">安全</span>
                                                 <span class="shalloworg">稳定</span>
                                                 <span class="shalloworg">新能源</span>
                                             </p>

                                         </div>
                                     </li>
                                     <!--车价格-->
                                     <li class="licar-info">
                                         <p class="condition1">
                                             <span class="cartitle"></span>
                                             <span class="carprice">
                                                             <i class="symbol">￥</i>
                                                             <em class="total-price">320</em>
                                                             /日均
                                                         </span>
                                             <a href="../myorder/save.jsp"><span class="licar-btn btnopen1 " >预定</span></a>
                                         </p>
                                     </li>
                                 </ul>
                             </div>
                         </div>
                         <div>
                             <div class="det-carlist" style="z-index: 299;">
                                 <ul>
                                     <!--车图片-->
                                     <li class="licar-picbox">
                                         <div class="licar-picinfo">
                                             <img src="${pageContext.request.contextPath}/image/list-car3.jpg" class="lazy" style="display: inline;">
                                         </div>
                                     </li>
                                     <!--车介绍-->
                                     <li class="licar-namebox">
                                         <div class="licar-nameinfo">
                                             <p class="car-nameinfo">
                                                 <span>日产天籁</span>
                                                 <a href="" class="sp-aczs sp-box">
                                                     <i class="lv5"></i>
                                                 </a>
                                             </p>
                                             <p class="car-introinfo">
                                                             <span>
                                                                 自然吸气2.0
                                                                 <text></text>
                                                             </span>
                                                 <text>|</text>
                                                 <span>三厢</span>
                                                 <text>|</text>
                                                 <span>5座</span>
                                                 <text>|</text>
                                                 <a href="" id="carDetail3">车辆详情></a>
                                             </p>
                                             <p class="car-introinfo">
                                                 <span></span>
                                             </p>
                                             <p class="car-activeinfo">
                                                 <span class="shalloworg">稳定</span>
                                                 <span class="shalloworg">空间</span>
                                                 <span class="shalloworg">新科技</span>
                                             </p>

                                         </div>
                                     </li>
                                     <!--车价格-->
                                     <li class="licar-info">
                                         <p class="condition1">
                                             <span class="cartitle"></span>
                                             <span class="carprice">
                                                             <i class="symbol">￥</i>
                                                             <em class="total-price">110</em>
                                                             /日均
                                                         </span>

                                             <a href="../myorder/save.jsp"><span class="licar-btn btnopen1 " >预定</span></a>
                                         </p>
                                     </li>
                                 </ul>
                             </div>
                         </div>
                         <div>
                             <div class="det-carlist" style="z-index: 299;">
                                 <ul>
                                     <!--车图片-->
                                     <li class="licar-picbox">
                                         <div class="licar-picinfo">
                                             <img src="${pageContext.request.contextPath}/image/list-car4.png" class="lazy" style="display: inline;">
                                         </div>
                                     </li>
                                     <!--车介绍-->
                                     <li class="licar-namebox">
                                         <div class="licar-nameinfo">
                                             <p class="car-nameinfo">
                                                 <span>大众探歌</span>
                                                 <a href="" class="sp-aczs sp-box">
                                                     <i class="lv5"></i>
                                                 </a>
                                             </p>
                                             <p class="car-introinfo">
                                                             <span>
                                                                 漩涡增压1.4
                                                                 <text></text>
                                                             </span>
                                                 <text>|</text>
                                                 <span>SUV</span>
                                                 <text>|</text>
                                                 <span>5座</span>
                                                 <text>|</text>
                                                 <a href="" id="carDetail4">车辆详情></a>
                                             </p>
                                             <p class="car-introinfo">
                                                 <span></span>
                                             </p>
                                             <p class="car-activeinfo">
                                                 <span class="shalloworg">安全</span>
                                                 <span class="shalloworg">空间</span>
                                                 <span class="shalloworg">语音助手</span>
                                             </p>

                                         </div>
                                     </li>
                                     <!--车价格-->
                                     <li class="licar-info">
                                         <p class="condition1">
                                             <span class="cartitle"></span>
                                             <span class="carprice">
                                                             <i class="symbol">￥</i>
                                                             <em class="total-price">230</em>
                                                             /日均
                                                         </span>
                                             <a href="../myorder/save.jsp"><span class="licar-btn btnopen1 " >预定</span></a>
                                         </p>
                                     </li>
                                 </ul>
                             </div>
                         </div>
                         <div>
                             <div class="det-carlist" style="z-index: 299;">
                                 <ul>
                                     <!--车图片-->
                                     <li class="licar-picbox">
                                         <div class="licar-picinfo">
                                             <img src="${pageContext.request.contextPath}/image/list-car5.png" class="lazy" style="display: inline;">
                                         </div>
                                     </li>
                                     <!--车介绍-->
                                     <li class="licar-namebox">
                                         <div class="licar-nameinfo">
                                             <p class="car-nameinfo">
                                                 <span>本田凌派</span>
                                                 <a href="" class="sp-aczs sp-box">
                                                     <i class="lv5"></i>
                                                 </a>
                                             </p>
                                             <p class="car-introinfo">
                                                             <span>
                                                                 涡轮增压1.0
                                                                 <text></text>
                                                             </span>
                                                 <text>|</text>
                                                 <span>三厢</span>
                                                 <text>|</text>
                                                 <span>5座</span>
                                                 <text>|</text>
                                                 <a href="" id="carDetail5">车辆详情></a>
                                             </p>
                                             <p class="car-introinfo">
                                                 <span></span>
                                             </p>
                                             <p class="car-activeinfo">
                                                 <span class="shalloworg">舒适</span>
                                                 <span class="shalloworg">省油</span>
                                                 <span class="shalloworg">语音助手</span>
                                             </p>

                                         </div>
                                     </li>
                                     <!--车价格-->
                                     <li class="licar-info">
                                         <p class="condition1">
                                             <span class="cartitle"></span>
                                             <span class="carprice">
                                                             <i class="symbol">￥</i>
                                                             <em class="total-price">130</em>
                                                             /日均
                                                         </span>
                                             <a href="../myorder/save.jsp"><span class="licar-btn btnopen1 " >预定</span></a>
                                         </p>
                                     </li>


                         <%--====================分页==============--%>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--右侧地图-->
    <div class="step1-body-right step1-right-float">
        <div id="divBookingInfo">
            <!--地图-->

            <div class="step1-map">
                <div id="map"
                     style="width: 100%; height: 100%; overflow: hidden; position: relative; z-index: 0; background-color: rgb(243, 241, 236); color: rgb(0, 0, 0); text-align: left;">
                    <div id="container">


                    </div>

                </div>

            </div>

            <!--信息-->
            <div class="step1-storeinfo">
                <ul>
                    <li>取车门店:</li>
                    <li><span>工业园区点</span></li>
                    <li>苏州市工业园区若水路1号(文萃广场内)</li>
                    <li>
                        <em>门店电话:</em>
                        <em>110-11945123456</em>
                    </li>
                    <li>
                        <em>营业时间:</em>
                        <em>08:00-21:00</em>
                    </li>
                    <li>
                        <a href="" style="color: #FF7123; white-space:nowrap;">苏州地区限行政策说明</a>
                    </li>
                    <li>
                        <a href="" style="color: #FF7123; white-space:nowrap;">预订规则说明>></a>
                    </li>
                </ul>
            </div>
        </div>

    </div>

</div>

<%--================分页===============--%>
<div id="demo0" style="margin-left: 360px ;z-index: 999 ;position: absolute;font-size: 20px;font-weight: bold"></div>
<br><br><br><br>


<%--<div class="pageInfo" style="margin-left: 460px ;z-index: 999 ;position: absolute;font-size: 20px;font-weight: bold">--%>
    <%--<a href="">上一页</a>
    当前是第xxx页,
    <a href="">下一页</a>
    共有xxx条，共有xxx页--%>
<%--</div>--%>
<!--底部-->

<footer class="global-footer fn-clear">

    <div class="zuche-bottom-info">
        <div class="box">
            <h3>关于</h3>
            <ul>
                <li><a rel="nofollow" href="" target="_blank">关于我们</a></li>
                <li><a rel="nofollow" href="" target="_blank">联系我们</a></li>
                <li><a rel="nofollow" href="" target="_blank">加入我们</a></li>
                <li><a rel="nofollow" href="" target="_blank">媒体报道</a></li>


            </ul>
        </div>
        <div class="box">
            <h3>条款</h3>
            <ul>
                <li><a rel="nofollow" href="" target="_blank">隐私条款</a></li>
                <li><a rel="nofollow" target="_blank" href="">用户协议</a></li>
                <li><a rel="nofollow" target="_blank" href="">信息处置制度</a></li>
                <li><a rel="nofollow" target="_blank" href="">租车规则</a></li>

            </ul>
        </div>
        <div class="box">
            <h3>帮助</h3>
            <ul>
                <li><a rel="nofollow" href="" target="_blank">客服中心</a></li>
                <li><a rel="nofollow" href="" target="_blank">互助问答</a></li>
                <li><a rel="nofollow" href="" target="_blank">常见问题</a></li>
                <li><a rel="nofollow" href="" target="_blank">出游安全提示</a></li>
            </ul>
        </div>

        <div class="box box_r">
            <div class="global-footer-icon wei-img fn-right">
                <!-- <em>微<br>信<br>公<br>众<br>号</em> -->
            </div>

            <div class="fn-right zzc_phone">
                <h4 class="service-title">客服热线</h4>
                <p class="title"><span class="sub">中国内地拨打：</span>1010-1020</p>
                <p class="text"><span class="sub">其他地区拨打： </span>+86-10-6064-1387</p>
                <a class="J-show-robot" href="javascript:;" target="_self" data-tj="/公用尾部/在线客服" style="width: auto">在线客服</a>
            </div>

        </div>

        <div class="fn-clear"></div>
    </div>
    <div class="credential">
        <h3 class="credential-title">资质证书</h3>
        <ul class="credential-list">
            <li><a href="" target="_blank" rel="nofollow"><i class="icon certificate"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon zfb_qc"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon baidu_rz"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon shi_ming"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon chengxin"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon kexin"></i></a></li>
            <li><a id="_pingansec_bottomimagesmall_shiming" href="" target="_blank" rel="nofollow"><i class="icon trustutn"></i></a></li>
        </ul>
    </div>
    <div class="copyright-box">
        <p>© 2011-2021 sbx.com&nbsp;&nbsp;思必行有限公司&nbsp;&nbsp;版权所有&nbsp;
            <a target="_blank" href="">营业执照</a>&nbsp;&nbsp;
            <a rel="nofollow" target="_blank" href="">苏ICP备114471007328号</a>&nbsp;&nbsp;
            <a rel="nofollow" target="_blank" href="" style="position: relative;padding-left: 24px;">
                <img src="" style="position: absolute;left: 0;top: -2px;">苏公网安备 44010602045644号
            </a>
        </p>
    </div>
</footer>
<%--<script src="${pageContext.request.contextPath}/js/person_rentalcar.js"></script>--%>

<%--====================时间===============================--%>
<%--<script src="${pageContext.request.contextPath}/layui/layui.js"></script>--%>

<script>
    /* layui.use('laydate', function(){
         var laydate = layui.laydate;
         //执行一个laydate实例
         laydate.render({
             elem: '#time1' //指定元素
         });
     });*/


    $(function () {

        //得到当前时间
        var date_now = new Date();
        //得到当前年份
        var year = date_now.getFullYear();
        //得到当前月份
        //注：
        //  1：js中获取Date中的month时，会比当前月份少一个月，所以这里需要先加一
        //  2: 判断当前月份是否小于10，如果小于，那么就在月份的前面加一个 '0' ， 如果大于，就显示当前月份
        var month = date_now.getMonth() + 1 < 10 ? "0" + (date_now.getMonth() + 1) : (date_now.getMonth() + 1);
        //得到当前日子（多少号）
        var date = date_now.getDate() < 10 ? "0" + date_now.getDate() : date_now.getDate();
        //设置input标签的max属性
        $("#time1").attr("min", year + "-" + month + "-" + date);
    })


    $(function () {
        //得到当前时间
        var date_now = new Date();
        //得到当前年份
        var year = date_now.getFullYear();
        //得到当前月份
        //注：
        //  1：js中获取Date中的month时，会比当前月份少一个月，所以这里需要先加一
        //  2: 判断当前月份是否小于10，如果小于，那么就在月份的前面加一个 '0' ， 如果大于，就显示当前月份

        var month = date_now.getMonth() + 1 < 10 ? "0" + (date_now.getMonth() + 1) : (date_now.getMonth() + 1);
        //得到当前日子（多少号）
        var date = date_now.getDate() < 10 ? "0" + date_now.getDate() : date_now.getDate();
        //设置input标签的max属性
        $("#time2").attr("min", year + "-" + month + "-" + date);

        var month = date_now.getMonth() + 1 < 10 ? "0" + (date_now.getMonth() + 1) : (date_now.getMonth() + 1);
        //得到当前日子（多少号）
        var date = date_now.getDate() < 10 ? "0" + date_now.getDate() : date_now.getDate();
        //设置input标签的max属性
        $("#time2").attr("min", year + "-" + month + "-" + date);

    })
</script>


<script>
    var map = new BMapGL.Map('container'); // 创建Map实例
    map.centerAndZoom('苏州市', 12); // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
    var getcarBrandname;
    var getminCarCategoryStartprice;
    var getmaxCarCategoryStartprice;
    var getcarMatic;
    var getcarSeatnum;
    var getpageNum;
    var carCategoryStartprice;
</script>
<script>
    //多条件查询
    $(".choose-typebox").click(function (event) {
        var target = event.target;
        console.log(target);
        var text = target.parentElement.children[0].innerText;
        var text1 = target.parentElement.parentElement.parentElement.children[0].innerText;


        if (text1 == "品牌:") {
            var siblings = target.parentElement.parentElement.children;
            for (var j = 0; j < siblings.length; j++) {
                siblings[j].className = "";
            }
            target.parentElement.className = "on";
            getResult();
        }

        if (text1 == "价格:") {
            var siblings = target.parentElement.parentElement.children;
            for (var j = 0; j < siblings.length; j++) {
                siblings[j].className = "";
            }
            target.parentElement.className = "on";
            getResult();
        }

        if (text1 == "排挡:") {
            var siblings = target.parentElement.parentElement.children;
            for (var j = 0; j < siblings.length; j++) {
                siblings[j].className = "";
            }
            target.parentElement.className = "on";
            getResult();
        }

        if (text1 == "座位:") {
            var siblings = target.parentElement.parentElement.children;
            for (var j = 0; j < siblings.length; j++) {
                siblings[j].className = "";
            }
            target.parentElement.className = "on";
            getResult();
        }

        function getResult() {
            var carBrandname;
            var carMatic;
            var carSeatnum;
            carBrandname = $(".choose-brand .on").text();
            carCategoryStartprice = $(".choose-price .on").text();
            carMatic = $(".choose-gear .on").text();
            carSeatnum = $(".choose-seat .on").text();
            console.log("carBrandname:" + carBrandname + "carCategoryStartprice:" + carCategoryStartprice + "carMatic:" + carMatic + "carSeatnum:" + carSeatnum + "status:" + status);

            CarList(carBrandname, carCategoryStartprice, carMatic, carSeatnum, 1, 0);

        }
    });


    CarList("全部", "全部", "全部", "全部", 1, 0);

    function CarList(carBrandname,
                     CarCategoryStartprice,
                     carMatic,
                     carSeatnum,
                     pageNum,
                     status
    ) {
        var getcarBrandname = carBrandname;
        var getCarCategoryStartprice = CarCategoryStartprice;
        var getcarMatic = carMatic;
        var getcarSeatnum = carSeatnum;

        var minCarCategoryStartprice = 1.0;
        var maxCarCategoryStartprice = 1.0;
        var getStatus = status;

        //判断
        if (carBrandname == "全部")
            carBrandname = "-1";
        if (CarCategoryStartprice == "全部") {
            minCarCategoryStartprice = -1;
            maxCarCategoryStartprice = -1;
        } else if (CarCategoryStartprice == "100元以下") {
            minCarCategoryStartprice = -1;
            maxCarCategoryStartprice = 100;
        } else if (CarCategoryStartprice == "100-200元") {
            minCarCategoryStartprice = 100;
            maxCarCategoryStartprice = 200;
        } else if (CarCategoryStartprice == "200-300元") {
            minCarCategoryStartprice = 200;
            maxCarCategoryStartprice = 300;
        } else if (CarCategoryStartprice == "300元以上") {
            minCarCategoryStartprice = 300;
            maxCarCategoryStartprice = -1;
        }

        if (carMatic == "全部")
            carMatic = "-1";
        if (carSeatnum == "全部")
            carSeatnum = -1
        else if (carSeatnum == "2座")
            carSeatnum = 2;
        else if (carSeatnum == "4座")
            carSeatnum = 4;
        else if (carSeatnum == "5座")
            carSeatnum = 5;
        else if (carSeatnum == "7座")
            carSeatnum = 7;


        <%--var url = '${pageContext.request.contextPath}/car/' + carBrandname + '/'--%>
        <%--    + minCarCategoryStartprice + '/' + maxCarCategoryStartprice + '/' + carMatic + '/' + carSeatnum + '/' + pageNum + '';--%>
        <%--console.log("url:"+url);  ///   car_rental/car/本田/-1/-1/-1/-1/1--%>

        var url = '${pageContext.request.contextPath}/car?carBrandname=' + carBrandname + "&minCarCategoryStartprice=" + minCarCategoryStartprice
            + "&maxCarCategoryStartprice=" + maxCarCategoryStartprice + "&carMatic=" + carMatic + "&carSeatnum=" + carSeatnum + "&pageNum=" + pageNum + "&status=" + status;


        console.log("=============url:" + url);

        $.get(url, null,
            function (result) {
                // $(".carTypeList1").html("");
                $(".carwrap").html("");
                if (result.code == 200) {
                    console.log("result" + JSON.stringify(result));
                    if (result.code == 200) {
                        var carArray = result.data.list;
                        console.log("car arr:" + carArray.length);
                        for (var i = 0; i < carArray.length; i++) {

                            var carId = carArray[i].carId;
                            var custId = "${ServiceResponse.data.custId}";
                            // 渲染数据到
                            var liEle = '<div>\n' +
                                '                            <div class="det-carlist" style="z-index: 299;">\n' +
                                '                                <ul>\n' +
                                '                                    <!--车图片-->\n' +
                                '                                    <li class="licar-picbox">\n' +
                                '                                        <div class="licar-picinfo">\n' +
                                '                                            <img src="' + carArray[i].carImgPath + '" class="lazy" style="display: inline;">\n' +
                                '                                        </div>\n' +
                                '                                    </li>\n' +
                                '                                    \n' +
                                '                                    <li class="licar-namebox">\n' +
                                '                                        <div class="licar-nameinfo">\n' +
                                '                                            <p class="car-nameinfo">\n' +
                                '                                                <span>' + carArray[i].carModel + '</span>\n' +
                                '                                                <a href="" class="sp-aczs sp-box">\n' +
                                '                                                    <i class="lv5"></i>\n' +
                                '                                                </a>\n' +
                                '                                            </p>\n' +
                                '                                            <p class="car-introinfo">\n' +
                                '                                                            <span>\n' +
                                '                                                                ' + carArray[i].carMatic + '|' + carArray[i].carDisplacement + '\n' +
                                '                                                                <text>T</text>\n' +
                                '                                                            </span>\n' +
                                '                                `                <text>|</text>\n' +
                                '                                                <span>热销</span>\n' +
                                '                                                <text>|</text>\n' +
                                '                                                <span>' + carArray[i].carSeatnum + '座</span>\n' +
                                '                                                <text>|</text>\n' +
                                '                                                <a href="" id="carDetail1">车辆详情></a>\n' +
                                '                                            </p>\n' +
                                '                                            <p class="car-introinfo">\n' +
                                '                                                <span></span>\n' +
                                '                                            </p>\n' +
                                '                                            <p class="car-activeinfo">\n' +
                                '                                                <span class="shalloworg">省油</span>\n' +
                                '                                                <span class="shalloworg">空间</span>\n' +
                                '                                                <span class="shalloworg">新能源</span>\n' +
                                '                                            </p>\n' +
                                '\n' +
                                '                                        </div>\n' +
                                '                                    </li>\n' +
                                '                                    \n' +
                                '                                    <li class="licar-info">\n' +
                                '                                        <p class="condition1">\n' +
                                '                                            <span class="cartitle"></span>\n' +
                                '                                            <span class="carprice">\n' +
                                '                                                            <i class="symbol">￥</i>\n' +
                                '                                                            <em class="total-price">' + carArray[i].carCategoryStartprice + '</em>\n' +
                                '                                                            /日均\n' +
                                '                                                        </span>\n' +
                                '                                            <a href="javascript:void(0)">\n + <i style="display: none">' + carId + '</i>' + '<span class="licar-btn btnopen1 " >预定</span>\n' +
                                '                                            </a>\n' +
                                '                                        </p>\n' +
                                '                                    </li>\n' +
                                '                                </ul>\n' +
                                '                            </div>\n' +
                                '                        </div>';

                            $(".carwrap").append(liEle);
                            /*console.log("cccccccccc:"+  $(".carwrap").html())*/
                        }
                        layui.use(['laypage', 'layer'], function() {
                            var laypage = layui.laypage
                                , layer = layui.layer;
                            //总页数低于页码总数
                            laypage.render({
                                elem: 'demo0', count: result.data.pages*10,theme: '#FF6633',curr: result.data.pageNum
                            });
                            document.querySelector("#demo0").onclick= function(event){
                                var ele = event.target;
                                var total = result.data.total;
                                console.log("total:" + total);
                                var pages = result.data.pages;
                                console.log("pages:" + pages);
                                var prepage = result.data.prePage;
                                console.log("prepage:" + prepage);
                                var nextpage = result.data.nextPage;
                                console.log("nextPage:" + nextpage);
                                if(ele.innerText=="下一页"){
                                    if(result.data.nextPage!=pages)
                                        CarList(carBrandname,CarCategoryStartprice,carMatic ,carSeatnum,result.data.nextPage,status);
                                }
                                else if(ele.innerText=="上一页"){
                                    if(result.data.prePage!=0)
                                        CarList(carBrandname , CarCategoryStartprice ,carMatic, carSeatnum ,result.data.prePage,status);
                                }
                                else {
                                    CarList(carBrandname , CarCategoryStartprice ,carMatic, carSeatnum ,ele.innerText,status);
                                }
                            }
                        });
                    }


                    //分页渲染
                    // $(".pageInfo").html("");
                    /* var pagenum = pageNum.data.pageNum;*/
                    // var total = result.data.total;
                    // console.log("total:" + total);
                    // var pages = result.data.pages;
                    // console.log("pages:" + pages);
                    // var prepage = result.data.prePage;
                    // console.log("prepage:" + prepage);
                    // var nextpage = result.data.nextPage;
                    // console.log("nextPage:" + nextpage);
                    //
                    //
                    // var prePageEle = '';
                    // if (result.data.prePage != 0) {
                    //     prePageEle = "<a style=\"color: #0ba1a1\" href=\"javascript:CarList('" + carBrandname + "','" + CarCategoryStartprice + "','" + carMatic + "','"
                    //         + carSeatnum + "','" + prepage + "','" + status + "')\">上一页</a>";
                    // }
                    //
                    // var nextPageEle = '';
                    // if (result.data.nextPage != pages) {
                    //     nextPageEle = "<a style=\"color: #0ba1a1\" href=\"javascript:CarList('" + carBrandname + "','" + CarCategoryStartprice + "','" + carMatic + "','"
                    //         + carSeatnum + "','" + nextpage + "','" + status + "')\">下一页</a>";
                    // }
                    // var currentPageEle = '当前是第' + result.data.pageNum + '页';
                    // const totalPageEle = ',共有记录' + total + '条,共有' + pages + '页';
                    //
                    //
                    // $(".pageInfo").append(prePageEle);
                    // $(".pageInfo").append(currentPageEle);
                    // $(".pageInfo").append(nextPageEle);
                    // $(".pageInfo").append(totalPageEle);

                } else {
                    $(".carwrap").text("抱歉,没有查询到相关信息...");
                }
            });
    }

    function CarListByStoreAndStore(storeId, getCarTime, carBrandname, carCategoryStartprice, carMatic, carSeatnum, status) {
        var getcarBrandname = carBrandname;
        var getCarCategoryStartprice = carCategoryStartprice;
        var getcarMatic = carMatic;
        var getcarSeatnum = carSeatnum;

        var minCarCategoryStartprice = 1.0;
        var maxCarCategoryStartprice = 1.0;
        var getStatus = status;

        //判断
        if (carBrandname == "全部")
            carBrandname = "-1";
        if (carCategoryStartprice == "全部") {
            minCarCategoryStartprice = -1;
            maxCarCategoryStartprice = -1;
        } else if (carCategoryStartprice == "100元以下") {
            minCarCategoryStartprice = -1;
            maxCarCategoryStartprice = 100;
        } else if (carCategoryStartprice == "100-200元") {
            minCarCategoryStartprice = 100;
            maxCarCategoryStartprice = 200;
        } else if (carCategoryStartprice == "200-300元") {
            minCarCategoryStartprice = 200;
            maxCarCategoryStartprice = 300;
        } else if (carCategoryStartprice == "300元以上") {
            minCarCategoryStartprice = 300;
            maxCarCategoryStartprice = -1;
        }

        if (carMatic == "全部")
            carMatic = "-1";
        if (carSeatnum == "全部")
            carSeatnum = -1
        else if (carSeatnum == "2座")
            carSeatnum = 2;
        else if (carSeatnum == "4座")
            carSeatnum = 4;
        else if (carSeatnum == "5座")
            carSeatnum = 5;
        else if (carSeatnum == "7座")
            carSeatnum = 7;

        var url = "${pageContext.request.contextPath}/car/StoreAndDate";
        $.get(url,
            {
                storeId: storeId,
                getCarTime: getCarTime,
                carBrandname: carBrandname,
                minCarCategoryStartprice: minCarCategoryStartprice,
                maxCarCategoryStartprice: maxCarCategoryStartprice,
                carMatic: carMatic,
                carSeatnum: carSeatnum
            },
            function (result) {

                // $(".carTypeList1").html("");
                $(".carwrap").html("");
                if (result.code == 200) {
                    console.log(JSON.stringify(result));

                    if (result.data == 200) {
                        var carArray = result.data;

                        for (var i = 0; i < carArray.length; i++) {
                            var custId = "${ServiceResponse.data.custId}";
                            // 渲染数据到
                            var liEle = '<div>\n' +
                                '                            <div class="det-carlist" style="z-index: 299;">\n' +
                                '                                <ul>\n' +
                                '                                    <!--车图片-->\n' +
                                '                                    <li class="licar-picbox">\n' +
                                '                                        <div class="licar-picinfo">\n' +
                                '                                            <img src="${pageContext.request.contextPath}/' + carArray[i].carImgPath + '" class="lazy" style="display: inline;">\n' +
                                '                                        </div>\n' +
                                '                                    </li>\n' +
                                '                                    \n' +
                                '                                    <li class="licar-namebox">\n' +
                                '                                        <div class="licar-nameinfo">\n' +
                                '                                            <p class="car-nameinfo">\n' +
                                '                                                <span>' + carArray[i].carModel + '</span>\n' +
                                '                                                <a href="" class="sp-aczs sp-box">\n' +
                                '                                                    <i class="lv5"></i>\n' +
                                '                                                </a>\n' +
                                '                                            </p>\n' +
                                '                                            <p class="car-introinfo">\n' +
                                '                                                            <span>\n' +
                                '                                                                ' + carArray[i].carMatic + '|' + carArray[i].carDisplacement + '\n' +
                                '                                                                <text>T</text>\n' +
                                '                                                            </span>\n' +
                                '                                                <text>|</text>\n' +
                                '                                                <span>热销</span>\n' +
                                '                                                <text>|</text>\n' +
                                '                                                <span>' + carArray[i].carSeatnum + '座</span>\n' +
                                '                                                <text>|</text>\n' +
                                '                                                <a href="" id="carDetail1">车辆详情></a>\n' +
                                '                                            </p>\n' +
                                '                                            <p class="car-introinfo">\n' +
                                '                                                <span></span>\n' +
                                '                                            </p>\n' +
                                '                                            <p class="car-activeinfo">\n' +
                                '                                                <span class="shalloworg">省油</span>\n' +
                                '                                                <span class="shalloworg">空间</span>\n' +
                                '                                                <span class="shalloworg">新能源</span>\n' +
                                '                                            </p>\n' +
                                '\n' +
                                '                                        </div>\n' +
                                '                                    </li>\n' +
                                '                                    \n' +
                                '                                    <li class="licar-info">\n' +
                                '                                        <p class="condition1">\n' +
                                '                                            <span class="cartitle"></span>\n' +
                                '                                            <span class="carprice">\n' +
                                '                                                            <i class="symbol">￥</i>\n' +
                                '                                                            <em class="total-price">' + carArray[i].carCategoryStartprice + '</em>\n' +
                                '                                                            /日均\n' +
                                '                                                        </span>\n' +
                                '                                            <a href="javascript:void(0)"><span class="licar-btn btnopen1 " >预定</span></a>\n' +
                                '                                        </p>\n' +
                                '                                    </li>\n' +
                                '                                </ul>\n' +
                                '                            </div>\n' +
                                '                        </div>';

                            $(".carwrap").append(liEle);
                            /*console.log("cccccccccc:"+  $(".carwrap").html())*/
                        }
                    }

                } else {
                    $(".carwrap").text("没有查询到相关信息");
                }

            });

    }

    $("#storeSel1").click(function () {
        $("#storeSel1").val("");
    })
    $("#storeSel2").click(function () {
        $("#storeSel2").val("");
    })
    var storeArr;
    initializationStore();

    function initializationStore() {
        $("#storeSel1").val("");
        var borrowStoreList = $("#borrow-store-list").html();
        console.log(borrowStoreList == "");
        if (borrowStoreList == "") {
            var city = $("#citySel1").val();
            console.log("city id:" + city);
            var url = "${pageContext.request.contextPath}/store/" + city;
            $.get(url, null,
                function (result) {
                    console.log("result>>>>>>" + JSON.stringify(result));
                    storeArr = result.data
                    console.log("storeArr>>>>>:" + storeArr);
                    for (var i = 0; i < storeArr.length; i++) {
                        var optionEle = '<option>' + storeArr[i].storeName + '</option>\n';
                        $("#borrow-store-list").append(optionEle);
                        $("#return-store-list").append(optionEle);
                    }

                    $("#storeSel1").val(storeArr[0].storeName);
                    $("#storeSel2").val(storeArr[0].storeName);
                    $("#borrow-store-id").text(storeArr[0].storeId);
                    $("#return-store-id").text(storeArr[0].storeId);

                    var getCarTime = $("#time1").val();


                    CarListByStoreAndStore(storeArr[0].storeId,
                        getCarTime,
                        "全部",
                        "全部",
                        "全部",
                        "全部",
                        0
                    )
                });
        }
    }


    $("#storeSel1").blur(function () {
        setSpanBorrowStoreId(storeArr);
    });
    $("#storeSel2").blur(function () {
        setSpanReturnStoreId(storeArr)
    });

    function setSpanBorrowStoreId(storeArr) {
        console.log("hello");
        var borrowStoreName = $("#storeSel1").val();

        if (borrowStoreName != "") {
            for (var j = 0; j < storeArr.length; j++) {
                var storeName = storeArr[j].storeName;
                var storeId = storeArr[j].storeId;
                console.log(borrowStoreName == storeName)
                if (borrowStoreName == storeName) {
                    $("#borrow-store-id").text(storeId);
                    break;
                } else if (j == storeArr.length - 1) {
                    alert("门店名输入有误~重新选择下吧~")
                    $("#storeSel1").val(storeArr[0].storeName)
                }
            }
        } else {
            alert("请选择门店~");
            $("#storeSel1").val(storeArr[0].storeName)
        }
    }

    function setSpanReturnStoreId(storeArr) {
        console.log("hello");
        var returnStoreName = $("#storeSel2").val();
        console.log("returnStoreName != 空：" + (returnStoreName != ""));
        console.log("returnStoreName" + returnStoreName);

        if (returnStoreName != "") {
            for (var j = 0; j < storeArr.length; j++) {
                var storeName = storeArr[j].storeName;
                var storeId = storeArr[j].storeId;
                if (returnStoreName == storeName) {
                    $("#return-store-id").text(storeId);
                    break;
                } else if (j == storeArr.length - 1) {
                    alert("门店名输入有误~重新选择下吧~")
                    $("#storeSel2").val(storeArr[0].storeName)
                }
            }
        } else {
            alert("请选择门店~");
            $("#storeSel2").val(storeArr[0].storeName)
        }
    }

    $(".carwrap").click(function (event) {
        var eventText = event.target.innerText;
        var custId = "${ServiceResponse.data.custId}"
        if (eventText = "预定") {
            if (custId != "") {
            var carId = event.target.parentElement.children[0].innerText;
            var rentStoreId = $("#borrow-store-id").text();
            var giveStoreId = $("#return-store-id").text();
            var borrowCarDate = $("#time1").val();
            var retCarDate = $("#time2").val();
            console.log("carId: " + carId);
            var retDate = new Date(retCarDate);
            if (new Date(borrowCarDate) <= new Date() && new Date(borrowCarDate) >= new Date(retCarDate)) {
                alert("时间选择错误，请重新选择");

            } else {
                var url = '${pageContext.request.contextPath}/myOrder?custId=' + custId + '&carId=' + carId +
                    '&rentStoreId=' + rentStoreId + '&giveStoreId=' + giveStoreId + '&borrowCarDate=' + borrowCarDate + '&retCarDate=' + retCarDate + '';
                window.location.href = url;
            }

            } else {
                window.location.href = "${pageContext.request.contextPath}/customer/login.jsp";
            }
        }
    });
</script>
</body>
</html>
